import 'package:black_movice/views/home.dart';
import 'package:black_movice/views/pages/details/details.dart';
import 'package:black_movice/views/pages/user/MoviceHistory.dart';
// import 'package:black_movice/views/splash_page/splash_page.dart';
// import 'package:flutter/src/widgets/navigator.dart';
import 'package:get/get.dart';

// 路由守卫
class RouterBefore extends GetMiddleware {
  // @override
  // RouteSettings? redirect(String? route) {
  //   return super.redirect(route);
  // }
}

abstract class Routers {
  static String root = "/"; //根路由
  static String home = "/home"; //主页
  static String details = "/details"; //详情页
  static String moviceHistory = "/history"; //电影历史记录
  //路由列表
  static final routerList = [
    // GetPage(
    //     name: Routers.root,
    //     page: () => const SplashPage(),
    //     transition: Transition.rightToLeft),
    GetPage(
        name: Routers.root,
        page: () => const Home(),
        transition: Transition.rightToLeft),
    GetPage(
        name: Routers.details,
        page: () => const Details(),
        transition: Transition.rightToLeft),
    GetPage(
        name: Routers.moviceHistory,
        page: () => const MoviceHistory(),
        transition: Transition.rightToLeft),
  ];
}
